<h1>Listing courses</h1>

<table>
  <tr>
    <th>User</th>
    <th>Title</th>
    <th>Description</th>
    <th>Is public</th>
    <th>Is freeze</th>
  </tr>

<% @courses.each do |course| %>
  <tr>
    <td><%=h course.title %></td>
    <td><%=h course.description %></td>
    <td><%=h course.is_public %></td>
    <td><%=h course.is_freeze %></td>
    <td><%= link_to 'Show', course %></td>
    <td><%= link_to 'Edit', edit_course_path(course) %></td>
    <td><%= link_to 'Destroy', course, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New course', new_course_path %>